package learnonline.web.servlet;

import java.io.IOException;
import java.util.List;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import learnonline.dao.CourseDao;
import learnonline.dao.impl.CourseDaoImpl;
import learnonline.entity.Course;
@WebServlet("/Course")
public class CourseServlet extends HttpServlet{
	private CourseDao courseDao=new CourseDaoImpl();
	@Override
	protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
		List<Course> course=courseDao.getAllCourse();
		req.setAttribute("course", course);
		req.getRequestDispatcher("Course.jsp").forward(req, resp);
	}
}
